#include "CLogger.h"

std::auto_ptr<CLogger> CLogger::m_instance;

CLogger::CLogger()
{}

CLogger::~CLogger()
{}

bool CLogger::Release()
{
    return true;
}

const std::string CLogger::GetString(e_LogTypes LogType)
{
	switch(LogType){
	case INFO:
		return "INFO";
		break;
	case DEBUG:
		return "DEBUG";
		break;
	case ERROR:
		return "ERROR";
		break;
	case FATAL:
		return "FATAL";
		break;
	default:
		return "UNDEFINED";
		break;
	}
}
void CLogger::Log(const std::string& LogMsg)
{
	Log(INFO,LogMsg);
}

void CLogger::Log(e_LogTypes LogType,const std::string& LogMsg)
{
	std::cout << GetString(LogType) << ":" << LogMsg << std::endl;
	m_LogMsg.insert(make_pair(LogType,LogMsg));
}
